package com.starlink.model.dtomapper;

import com.starlink.model.domain.ShoppingCartDO;
import com.starlink.model.request.ShoppingCartRequest;
import com.starlink.model.vo.ShoppingCartVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface ShoppingCartDtoMapper {

    ShoppingCartDtoMapper INSTANCE = Mappers.getMapper(ShoppingCartDtoMapper.class);

    /**
    * DO to VO
    * @param shoppingCartDO
    * @return
    */
    ShoppingCartVO do2VO(ShoppingCartDO shoppingCartDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    ShoppingCartDO request2DO(ShoppingCartRequest request);
}
